'use strict';

const Sequelize = require('sequelize');
const sequelize = require('../util/sequelize');

var MessageComment = sequelize.define('message_comment', {
    messageId: {
        type: Sequelize.STRING
    },
    userId: {
        type: Sequelize.STRING
    },
    userName: {
        type: Sequelize.STRING
    },
    userGender: {
        type: Sequelize.INTEGER
    },
    avatarUrl: {
        type: Sequelize.STRING,
        allowNull: true,
    },
    comment: {
        type: Sequelize.TEXT
    },
    replyCommentId: {
        type: Sequelize.INTEGER,
        allowNull: true,
    },
    enabel: {
        type: Sequelize.BOOLEAN,
        allowNull: false,
        defaultValue: true
    }
});

MessageComment.sync({
    force: false
});

module.exports = MessageComment;